<?php 
	defined('_JEXEC') or die('Restricted access');
	
	$input = JFactory::getApplication()->input;
	$location_id = $input->get("location");
	$location_alias = $input->get("location_alias");
	$return = base64_encode("index.php?option=com_bakerys&view=billaddress&location=$location_id:$location_alias");
?>
<style>
	.btndefault input[type="submit"],.btndefault input[type="button"] {
		border: none;
		background: none;
		color: #FFFFFF;
		text-transform: uppercase;
		font-weight: bold;
		letter-spacing: 1px;
		text-shadow: 1px 0 0;
		height: 100%;
	}
</style>

<div class="checkout_register row-fluid">		
	<div id="sj_login_box" class="show-box span6">
		<div class="sj_box_inner">
			<div class="sj_box_title">
				<h3>Sign In</h3>
			</div>
			<div class="sj_box_content">
				<form id="login_form" action="index.php" method="post">
					<fieldset class="userdata">
						<div class="login_input">
							<p>
								<label for="modlgn-username" class="sj-login-user">
									<span>&nbsp;</span><input id="modlgn-username" type="text" name="username" class="inputbox" size="25" placeholder="User Name">
									<a href="/bakery/component/users/?view=remind" title="Forgot your username?"><span>?</span></a>
								</label>
							</p>
							<p>
								<label for="modlgn-passwd" class="sj-login-password">
									<span>&nbsp;</span><input id="modlgn-passwd" type="password" name="password" class="inputbox" size="25" placeholder="Password">
									<a href="/bakery/component/users/?view=reset" title="Forgot your password?"><span>?</span></a>
								</label>
							</p>
						</div>
						<div class="login_button">
							<p id="form_login_remember">
								<input id="modlgn-remember" type="checkbox" name="remember" class="checkbox" value="yes">
								<label for="modlgn-remember">Remember Me</label>
							</p>
							<br>
							<div class="button2" style="margin:0 !important">
								<input type="submit" name="Submit" class="button" value="Log in">
							</div>
						</div>
						<input type="hidden" name="option" value="com_users">
						<input type="hidden" name="task" value="user.login">
						<input type="hidden" name="return" value="<?php echo $return ?>">
						<?php echo JHtml::_('form.token'); ?>						
					</fieldset>
					<div class="more_login sj-login-links clearfix"></div>
				</form>
			</div>
		</div>
	</div>	
	
	
	<div id="sj_register_box" class="show-box span6">
		<div class="inner">
			<div class="sj_box_inner">
				<div class="sj_box_title">
					<h3>Create an Account</h3>
				</div>
				<div class="sj_box_content">
					<script type="text/javascript">
					<!--
						window.addEvent('domready', function(){
							document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); }	);
						});
					// -->
					</script>         
					<form id="member_registration" class="form-validate" action="/bakery/products.html" method="post">
						<div class="col-right">
							<label class="required sj-field-regis" for="jform_name" id="namemsg" title="Name&lt;br&gt;Enter your full name">
								<span>&nbsp;</span><input type="text" size="25" class="inputbox required" value="" id="jform_name" name="jform[name]" placeholder="Name" aria-required="true" required="required">
							</label>
							<label title="" class="required sj-field-regis" for="jform_username" id="usernamemsg">
								<span>&nbsp;</span><input type="text" size="25" class="inputbox validate-username required" value="" id="jform_username" name="jform[username]" placeholder="Login name" aria-required="true" required="required">
							</label>
							<label title="" class="required sj-field-regis" for="jform_password1" id="pwmsg">
								<span>&nbsp;</span><input type="password" size="25" class="inputbox validate-password required" value="" id="jform_password1" name="jform[password1]" placeholder="Password" aria-required="true" required="required">
							</label>
							<label title="" class="required sj-field-regis" for="jform_password2" id="pw2msg">
								<span>&nbsp;</span><input type="password" size="25" class="inputbox validate-password required" value="" id="jform_password2" name="jform[password2]" placeholder="Verify Password" aria-required="true" required="required">
							</label>    
							<label title="" class="required sj-field-regis" for="jform_email1" id="emailmsg">
								<span>&nbsp;</span><input type="email" size="25" class="inputbox validate-email required" value="" id="jform_email1" name="jform[email1]" placeholder="Email" aria-required="true" required="required">
							</label>
							<label title="" class="required sj-field-regis" for="jform_email2" id="email2msg">
								<span>&nbsp;</span><input type="email" size="25" class="inputbox validate-email required" value="" id="jform_email2" name="jform[email2]" placeholder="Verify Email" aria-required="true" required="required">
							</label>

							<div class="button2"><input type="submit" class="validate button" value="Register"></div>
						</div>

						<input type="hidden" name="option" value="com_users">
						<input type="hidden" name="task" value="registration.register">
						<input type="hidden" name="return" value="<?php echo $return ?>">
						<?php echo JHtml::_('form.token'); ?>								
					</form>
				</div>
			 </div>
		</div>
	</div>
</div>
<br>
<div class="row-fluid">
<!--Guest -->
	<div class="span12">
	<form action="<?php echo JRoute::_("index.php?option=com_bakerys&view=billaddress&location=$location_id:$location_alias") ?>" method="post" class="guestform" name="guest" id="guestform">		
			<div class="sj_box_title">
				<h3 style="margin-bottom:0">Dont have an account? You can checkout as a guest</h3>
			</div>
			<br>
				
			<label for="guest_mail"><strong> Guest Email</strong><em>*</em>
			</label> 
			<input name="guest_mail" style="margin-bottom:0px" id="guest_mail" class="required email" type="email" title="Enter your email if you want to checkout as guest">
			
			<div class="button2 btndefault" style="margin-left:20px !important">
				<input type="submit" name="Submit" class="button" value="Check out as aguest">
			</div>
			
		</form>
	</div> 
</div>